<template>
  <div id="mask">
    <div class="mask-dialog"  v-show="mask.isShow1" >
      <div class="mask"></div>
        <div class="m-dialog mask1">
          <div class="bact"></div>
          <div class="top">
            <div class="left1">
              <span class="icon"><i class="fa fa-jpy" aria-hidden="true"></i></span>
              <span class="num">{{num1}}</span>
            </div>
            <div class="right1">
              <p>{{title}}</p>
            </div>
          </div>
          <div class="txt">
            <p>您的信息已完善,李宁为您准备了新人礼</p>
            <p>请前往会员中心-优惠券查看</p>
          </div>
          <div class="footer">
            <a href="javascript:;" @click="routeto('membercenter')" class="wsxx1">去会员中心</a>
          </div>
          <div class="bacb"></div>
      </div>
    </div>
    <div class="mask-dialog" v-show="mask.isShow2" >
      <div class="mask"></div>
        <div class="m-dialog">
          <div class="bact"></div>
          <div class="top1">
            <span class="num">{{num2}}</span>
            <span>积分</span>
          </div>
          <div class="txt">
            <p>您的信息已完善,李宁为您准备了新人礼</p>
            <p>请前往会员中心-积分查看</p>
          </div>
          <div class="footer">
            <a class="wsxx1" href="javascript:;" @click="routeto('membercenter')">去会员中心</a>
          </div>
          <div class="bacb"></div>
        </div>
    </div>

    <div class="mask-dialog" v-show="mask.isShow3" >
      <div class="mask"></div>
        <div class=" m-dialog1">
          <div class="txt1">
            <p>您的礼品已经领取成功</p>
            <p>我们将尽快为您发货</p>
          </div>
          <div class="footer line">
            <!-- <span class="wsxx">去会员中心</span> -->
            <a class="wsxx2" href="javascript:;" @click="routeto('membercenter')">去会员中心</a>
          </div>
        </div>
    </div>
  </div>
</template>

<script>
  export default {
    data () {
      return {
        data: {},
        num1: '',
        num2: '',
        title: '',
        Maxnum1: ''
      }
    },
    name: 'mask',
    props: {
      mask: {
        type: Object
      }
    },
    watch: {
      mask: function (newQuestion) {
        this.getlist()
      }
    },
    methods: {
      getlist () {
        // this.data = JSON.parse(sessionStorage.product)
        if (this.mask.data.type === 'coupon') {
          this.num1 = parseFloat(this.mask.data.faceValue).toFixed(0)
          this.title = this.mask.data.name
          this.Maxnum1 = this.mask.data.ruleDesc
        }
        if (this.mask.data.type === 'point') {
          this.num2 = this.mask.data.point
        }
      }
    }
  }
</script>
<style lang="less">
  @import "../../assets/less/mask/mask.less";
</style>
